<template>
	<view class="content">

		<!-- header -->
		<view class="box-bg">
			<uni-nav-bar right-icon="notification" title="MakeUp" :border="false" />
		</view>

		<!-- input -->
		<view class='inp' @click="jump('../search/search')">
			<uni-icons class="icons" type="search" size="18"></uni-icons>
			<input type="text" disabled placeholder='折扣直降狂欢' placeholder-style="font-size:12px;">
			<button class="btn" type="primary" size='mini'>搜索</button>
		</view>

		<!-- scoll -->
		<!-- <uni-breadcrumb separator="" class="section"> -->
		<!-- :to="route.to" -->
		<!-- <uni-breadcrumb-item class="section-list" :class="activeindex===index?'active':''"
				v-for="(route,index) in routes" :key="index">
				{{route.name}}
			</uni-breadcrumb-item>
		</uni-breadcrumb> -->
		<!-- f2：分类菜单 -->
		<view class="cate">
			<view class="cate-box">
				<text class="cate-item" :class="activeindex === cateindex?'active_cate':''" @tap="change(cateindex)"
					v-for="(cate,cateindex) in routes" :key="cateindex">{{cate.name}}</text>
			</view>
		</view>


		<!-- 轮播图 -->
		<swiper class="swiper" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
			<swiper-item>
				<view class="swiper-item">
					<image src="../../static/image/indexbanner01.webp" mode="widthFix"></image>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<image src="../../static/image/indexbanner02.webp" mode="widthFix"></image>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<image src="../../static/image/indexbanner03.webp" mode="widthFix"></image>
				</view>

			</swiper-item>
		</swiper>

		<!-- 轮播图底部框 -->
		<view class="text-bot">
			<text>Hi&nbsp; &nbsp;188****9971</text>
		</view>

		<!-- 六楼美丽探索 -->
		<view class="beautiful">
			<view class="beautiful_one">
				<text>美力探索</text>
			</view>
		</view>
		<view class="beau">
			<view class="beautiful_two">
				<text>预约服务</text>
				<image src="/static/image//secondfloor01.webp" mode=""></image>

			</view>
			<view class="beautiful_there">
				<text>在线咨询</text>
				<image src="/static/image//secondfloor02.webp" mode=""></image>
			</view>
		</view>
		<text class="for_tt">其他栏目</text>
		<view class="beautiful_for">
			<!-- <text class="for_tt">其他栏目</text> -->
			<view class="beautiful_list">
				<image src="../../static/image/column01.webp" mode=""></image>
				<text>护肤到位</text>
			</view>
			<view class="beautiful_list">
				<image src="/static/image/column02.webp" mode=""></image>
				<text>口红种草</text>
			</view>
			<view class="beautiful_list">
				<image src="/static/image/column03.webp" mode=""></image>
				<text>底妆助手</text>
			</view>
			<view class="beautiful_list">
				<image src="/static/image/column04.webp" mode=""></image>
				<text>帮助中心</text>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				activeindex: 0,
				routes: [{
						to: "/pages/index/index",
						name: "精选",
					},
					{
						to: "/pages/skincare/skincare",
						name: "护肤",
					},
					{
						to: "/pages/makeup/makeup",
						name: "彩妆",
					},
					{
						to: "/pages/toilet/toilet",
						name: "香水",
					},
					{
						to: "/pages/minority/minority",
						name: "小众",
					},
					{
						to: "/pages/man/man",
						name: "男士",
					},
				],


			};
		},
		methods: {
			change(index) {
				this.activeindex = index
			},
			jump(url) {
				//跳转到指定url
				uni.navigateTo({
					url: url
				})
			}
		}
	};
</script>

<style scoped lang='scss'>
	/* 一楼导航栏 */
	.box-bg {
		padding: 0 $uni-spacing-row-sm;
		display: block;
		width: 750rpx;

		::v-deep .uni-navbar {
			display: block;

			.uni-navbar__content {
				display: block;
			}
		}

		.uni-nav-bar {
			width: 100%;
		}
	}

	/* 二楼搜索框 */
	.inp {
		width: 700rpx;
		margin: 0 auto;
		justify-content: space-between;
		align-items: center;
		position: relative;

		.icons {
			position: absolute;
			left: 10rpx;
		}

		input {
			background-color: $uni-bg-color-grey;
			width: 100%;
			height: 60rpx;
			padding-left: 50rpx;
			padding-right: 160rpx;
			margin: 0 auto;
			border-radius: 20rpx 0 0 20rpx;

		}

		.btn {
			position: absolute;
			right: 0;
			width: 140rpx;
			flex-direction: row;
			height: 60rpx;
			background-color: black;
			line-height: 60rpx;
		}
	}


	/* 三楼 分类列表 */
	/* 	.section {
		width: 600rpx;
		padding: 0 $uni-spacing-row-base;
		margin-top: $uni-spacing-col-lg;

		.section-list {
			padding-left: 10rpx;
		}

		.active {
			font-weight: bold;
		}
	} */

	.cate {
		margin-top: $uni-spacing-col-lg;
		padding: $uni-spacing-col-sm $uni-spacing-row-lg;
		width: 750rpx;
		overflow: hidden;

		.cate-box {
			overflow: hidden;
			white-space: nowrap;
			overflow-x: scroll;

			&::-webkit-scrollbar {
				display: none
			}

			.cate-item {
				display: inline-flex;
				margin-right: $uni-spacing-row-lg*2;
				color: $uni-text-color-grey;
				font-size: $uni-font-size-base;
			}

			.active_cate {
				color: $uni-text-color;
			}
		}
	}

	/* 四楼轮播图 */
	.swiper {
		width: 750rpx;
		height: 550rpx;

		swiper-item {
			width: 100%;

			.swiper-item {
				margin-top: 30rpx;
				width: 100%;

				image {
					width: 100%;
				}
			}
		}


		::v-deep .uni-swiper-dots-horizontal {
			bottom: 50rpx;
		}
	}

	/* 五楼轮播图底部文字 */
	.text-bot {
		position: relative;
		bottom: 50rpx;
		width: 700rpx;
		border-radius: 15rpx;
		padding: $uni-spacing-col-lg 0;
		margin: 0 auto;
		box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
		background-color: $uni-bg-color-grey;
		display: flex;
		justify-content: center;

		text {
			font-size: $uni-font-size-base;
			font-weight: bold;
		}
	}

	/* 六楼美丽探索 */
	.beautiful {
		width: 750rpx;
		padding: 0 $uni-spacing-col-lg*2;
		margin: 0 auto;

		.beautiful_one {
			text {
				font-weight: bold;
				font-size: 20px;
			}
		}
	}

	.beau {
		width: 750rpx;
		padding: 0 $uni-spacing-col-lg*2;
		margin: 30rpx 0;
		border-radius: 15rpx;

		.beautiful_two {
			flex-direction: column;
			border-radius: 15rpx;
			margin-top: 20rpx;
			padding-left: 20rpx;

			>text {
				font-weight: bold;
				font-size: 16px;
			}

			>image {
				width: 200rpx;
				height: 200rpx;
				border-radius: 10rpx;
				margin-top: 20rpx;
			}
		}

		.beautiful_there {
			flex-direction: column;
			margin-top: 20rpx;
			border-radius: 15rpx;
			padding-left: 20rpx;

			>text {
				font-weight: bold;
				font-size: 16px;
			}

			>image {
				width: 200rpx;
				height: 200rpx;
				border-radius: 10rpx;
				margin-top: 20rpx;
			}
		}


	}

	.for_tt {
		font-weight: bold;
		font-size: 20px;
		width: 750rpx;
		padding: 0 $uni-spacing-col-lg*2;
		margin: 30rpx auto;

	}

	.beautiful_for {
		margin: 20rpx auto;
		width: 750rpx;
		padding: 0 $uni-spacing-col-lg*2;
		border-radius: 15rpx;

		.beautiful_list {
			flex-direction: column;
			width: 150rpx;
			align-items: center;

			text {
				font-weight: bold;
				font-size: 14px;
			}

			image {
				margin-bottom: 10rpx;
				width: 100rpx;
				height: 100rpx;
			}
		}

	}
</style>
